<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.14.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>DM-CtrlH7-BF-DevProgram: Square Root</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="50x5.png"/></td>
  <td id="projectalign">
   <div id="projectname">DM-CtrlH7-BF-DevProgram<span id="projectnumber">&#160;beta 0.1</span>
   </div>
   <div id="projectbrief">C.ONE Studio Damiao Development Board Framework</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.14.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search',true);
  $(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(function(){initNavTree('group___s_q_r_t.html','',''); });
</script>
<div id="container">
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="headertitle"><div class="title">Square Root <div class="ingroups"><a class="el" href="group__group_fast_math.html">Fast Math Functions</a></div></div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 id="header-func-members" class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga5f37f479666ee8ff9711b334286c60ed" id="r_ga5f37f479666ee8ff9711b334286c60ed"><td class="memItemLeft" align="right" valign="top">__STATIC_FORCEINLINE arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga5f37f479666ee8ff9711b334286c60ed">arm_sqrt_f32</a> (float32_t in, float32_t *pOut)</td></tr>
<tr class="memdesc:ga5f37f479666ee8ff9711b334286c60ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Floating-point square root function.  <br /></td></tr>
<tr class="memitem:ga119e25831e141d734d7ef10636670058" id="r_ga119e25831e141d734d7ef10636670058"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga119e25831e141d734d7ef10636670058">arm_sqrt_q31</a> (q31_t in, q31_t *pOut)</td></tr>
<tr class="memdesc:ga119e25831e141d734d7ef10636670058"><td class="mdescLeft">&#160;</td><td class="mdescRight">Q31 square root function.  <br /></td></tr>
<tr class="memitem:ga5abe5ca724f3e15849662b03752c1238" id="r_ga5abe5ca724f3e15849662b03752c1238"><td class="memItemLeft" align="right" valign="top">arm_status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga5abe5ca724f3e15849662b03752c1238">arm_sqrt_q15</a> (q15_t in, q15_t *pOut)</td></tr>
<tr class="memdesc:ga5abe5ca724f3e15849662b03752c1238"><td class="mdescLeft">&#160;</td><td class="mdescRight">Q15 square root function.  <br /></td></tr>
<tr class="memitem:gaa9b8a2bea8a22489bfd968eb4687a7bd" id="r_gaa9b8a2bea8a22489bfd968eb4687a7bd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#gaa9b8a2bea8a22489bfd968eb4687a7bd">arm_vsqrt_f32</a> (float32_t *pIn, float32_t *pOut, uint16_t len)</td></tr>
<tr class="memdesc:gaa9b8a2bea8a22489bfd968eb4687a7bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Vector Floating-point square root function.  <br /></td></tr>
<tr class="memitem:ga5955b76f2a60c1636ff507182000193d" id="r_ga5955b76f2a60c1636ff507182000193d"><td class="memItemLeft" align="right" valign="top"><a id="ga5955b76f2a60c1636ff507182000193d" name="ga5955b76f2a60c1636ff507182000193d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>arm_vsqrt_q31</b> (q31_t *pIn, q31_t *pOut, uint16_t len)</td></tr>
<tr class="memitem:ga793f913a2b3a8f45577db36136954cdc" id="r_ga793f913a2b3a8f45577db36136954cdc"><td class="memItemLeft" align="right" valign="top"><a id="ga793f913a2b3a8f45577db36136954cdc" name="ga793f913a2b3a8f45577db36136954cdc"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>arm_vsqrt_q15</b> (q15_t *pIn, q15_t *pOut, uint16_t len)</td></tr>
</table>
<a name="details" id="details"></a><h2 id="header-details" class="groupheader">Detailed Description</h2>
<p>Computes the square root of a number. There are separate functions for Q15, Q31, and floating-point data types. The square root function is computed using the Newton-Raphson algorithm. This is an iterative algorithm of the form: </p><pre>
     x1 = x0 - f(x0)/f'(x0)
</pre><p> where <code>x1</code> is the current estimate, <code>x0</code> is the previous estimate, and <code>f'(x0)</code> is the derivative of <code>f()</code> evaluated at <code>x0</code>. For the square root function, the algorithm reduces to: </p><pre>
    x0 = in/2                         [initial guess]
    x1 = 1/2 * ( x0 + in / x0)        [each iteration]
</pre><a name="doc-func-members" id="doc-func-members"></a><h2 id="header-doc-func-members" class="groupheader">Function Documentation</h2>
<a id="ga5f37f479666ee8ff9711b334286c60ed" name="ga5f37f479666ee8ff9711b334286c60ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5f37f479666ee8ff9711b334286c60ed">&#9670;&#160;</a></span>arm_sqrt_f32()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_FORCEINLINE arm_status arm_sqrt_f32 </td>
          <td>(</td>
          <td class="paramtype">float32_t</td>          <td class="paramname"><span class="paramname"><em>in</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float32_t *</td>          <td class="paramname"><span class="paramname"><em>pOut</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Floating-point square root function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>input value </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">pOut</td><td>square root of input value </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>execution status<ul>
<li>ARM_MATH_SUCCESS : input value is positive</li>
<li>ARM_MATH_ARGUMENT_ERROR : input value is negative; *pOut is set to 0 </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga5abe5ca724f3e15849662b03752c1238" name="ga5abe5ca724f3e15849662b03752c1238"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5abe5ca724f3e15849662b03752c1238">&#9670;&#160;</a></span>arm_sqrt_q15()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_sqrt_q15 </td>
          <td>(</td>
          <td class="paramtype">q15_t</td>          <td class="paramname"><span class="paramname"><em>in</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q15_t *</td>          <td class="paramname"><span class="paramname"><em>pOut</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Q15 square root function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>input value. The range of the input value is [0 +1) or 0x0000 to 0x7FFF </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">pOut</td><td>points to square root of input value </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>execution status<ul>
<li>ARM_MATH_SUCCESS : input value is positive</li>
<li>ARM_MATH_ARGUMENT_ERROR : input value is negative; *pOut is set to 0 </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga119e25831e141d734d7ef10636670058" name="ga119e25831e141d734d7ef10636670058"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga119e25831e141d734d7ef10636670058">&#9670;&#160;</a></span>arm_sqrt_q31()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">arm_status arm_sqrt_q31 </td>
          <td>(</td>
          <td class="paramtype">q31_t</td>          <td class="paramname"><span class="paramname"><em>in</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">q31_t *</td>          <td class="paramname"><span class="paramname"><em>pOut</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Q31 square root function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>input value. The range of the input value is [0 +1) or 0x00000000 to 0x7FFFFFFF </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">pOut</td><td>points to square root of input value </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>execution status<ul>
<li>ARM_MATH_SUCCESS : input value is positive</li>
<li>ARM_MATH_ARGUMENT_ERROR : input value is negative; *pOut is set to 0 </li>
</ul>
</dd></dl>

</div>
</div>
<a id="gaa9b8a2bea8a22489bfd968eb4687a7bd" name="gaa9b8a2bea8a22489bfd968eb4687a7bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa9b8a2bea8a22489bfd968eb4687a7bd">&#9670;&#160;</a></span>arm_vsqrt_f32()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void arm_vsqrt_f32 </td>
          <td>(</td>
          <td class="paramtype">float32_t *</td>          <td class="paramname"><span class="paramname"><em>pIn</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float32_t *</td>          <td class="paramname"><span class="paramname"><em>pOut</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t</td>          <td class="paramname"><span class="paramname"><em>len</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Vector Floating-point square root function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pIn</td><td>input vector. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">pOut</td><td>vector of square roots of input elements. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>length of input vector. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if <code>in</code> is negative value and returns zero output for negative values. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="page-nav" class="page-nav-panel">
<div id="page-nav-resize-handle"></div>
<div id="page-nav-tree">
<div id="page-nav-contents">
</div><!-- page-nav-contents -->
</div><!-- page-nav-tree -->
</div><!-- page-nav -->
</div><!-- container -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.14.0 </li>
  </ul>
</div>
</body>
</html>
